import { FC } from 'react';
import { Result, Space } from 'antd';
import { observer, useLocalStore } from 'mobx-react';

import { resetPasswordStore } from '@/stores/ResetPassword';

const CompleteForm: FC = () => {
  const parentStore = useLocalStore(() => resetPasswordStore);

  return (
    <>
      <Result
        status="success"
        title="密码重置成功!"
        subTitle={
          <Space>
            重置账户名:{' '}
            <span style={{ color: 'rgb(24, 144, 255)' }}>
              {parentStore.sureAccountFormInitValues?.username}
            </span>
            所属邮箱:{' '}
            <span style={{ color: 'rgb(24, 144, 255)' }}>
              {parentStore.sureAccountFormInitValues?.email}
            </span>
          </Space>
        }
        style={{ padding: 0, paddingBottom: 8 }}
      />
    </>
  );
};

export default observer(CompleteForm);
